package com.lh.common.entity.admin;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.lh.common.enums.UpperLowerShelfStatus;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.ibatis.type.Alias;

import javax.persistence.Column;
import javax.persistence.Id;
import java.io.Serializable;
import java.util.List;

/**
 * @author FH
 * @ClassName: Category
 * @Description: (类作用)
 * @date: 2020-06-28 9:31
 */
@TableName("ovmal_sort")
@Alias("sort")
@Data
public class Category implements Serializable {

    @ApiModelProperty(value = "")
    @Id
    private Long id;

    @ApiModelProperty(value = "排序")
    private String sortReorder;

    @ApiModelProperty(value = "名称",allowEmptyValue=true,required = true)
    private String sortName;

    @ApiModelProperty(value = "图片",allowEmptyValue=true,required = true)
    private String sortPic;

    @ApiModelProperty(value = "状态  UPPERSHELF:上架; LOWERSHELF:下架")
    @Column(name = "sort_status")
    private UpperLowerShelfStatus sortStatus;

    @ApiModelProperty(value = "父分类ID   一级分类为0;")
    private Long sortParentId;

    @ApiModelProperty(value = "")
    private String createTime;

    @ApiModelProperty(value = "")
    private String updateTime;

    @ApiModelProperty(value = "子元素列表")
    @TableField(exist=false)
    private List<Category> children;

    @ApiModelProperty(value = "商品数")
    @TableField(exist=false)
    private Long con;

    @ApiModelProperty(value = "分类级别")
    @TableField(exist=false)
    private int type;

    private Long value;

    private String label;
}
